// src\redux\reducers\CollapsedReducer.js
// 控制侧边栏伸缩的reducer

export const CollApsedReducer = (prevState = {
    isCollapsed: false//控制侧边栏是否伸展的变量的初始化
}, action) => {
    // console.log("CollApsedReducer的action:",action);
    let { type } = action;
    switch (type) {
        case 'change_collapsed':
            let newState = { ...prevState };
            newState.isCollapsed = !newState.isCollapsed;
            return newState;
        default:
            return prevState;
    }
};

